{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import ipywidgets as widgets\n",
    "\n",
    "color = widgets.ColorPicker(value=\"red\", description=\"Pick a color\")\n",
    "info = widgets.HTML(value=\"Pick a color \")\n",
    "\n",
    "\n",
    "def on_color_change(change):\n",
    "    info.value = f'<span style=\"color: {change.new}\"> You picked {change.new}</span>'\n",
    "\n",
    "\n",
    "color.observe(on_color_change, names=\"value\")\n",
    "page = widgets.VBox([color, info])\n",
    "page"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "dev",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.10"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "3f54047370d637df4a365f9bae65e296d7b1c0737aca7baed81d825616d991e7"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
